<?php

namespace common\validate;

class OrderTaskFileList extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    // Fields 验证场景定义
    public function sceneFields()
    {
        return $this;
    }

    // Find 验证场景定义
    public function sceneFind()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'array');
    }

    // Select 验证场景定义
    public function sceneSelect()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'array')
            ->append('param.page', 'array');
    }

    // Create 验证场景定义
    public function sceneCreate()
    {
        return $this->append('data.name', 'require|max:128')
            ->append('data.code', 'max:128');
    }

    // Delete 验证场景定义
    public function sceneDelete()
    {
        return $this->append('param.filter', 'require');
    }

    // Update 验证场景定义
    public function sceneUpdate()
    {
        return $this
            ->append("data", "require")
            ->append("data.id", "require|integer|min:1");
    }

    // GetUploadList 验证场景定义
    public function sceneGetUploadList()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'array')
            ->append('param.page', 'array');
    }

    // GetDownloadList 验证场景定义
    public function sceneGetDownloadList()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'array')
            ->append('param.page', 'array');
    }

    // MarkVersionUploading 验证场景定义
    public function sceneMarkVersionUploading()
    {
        return $this->append('param.filter.version_id', 'require');
    }

    // MarkVersionUploaded 验证场景定义
    public function sceneMarkVersionUploaded()
    {
        return $this
            ->append("data", "require")
            ->append("data.id", "require|integer|min:1");
    }

    // RemoveUploadingMark 验证场景定义
    public function sceneRemoveUploadingMark()
    {
        return $this->append('param.filter.version_id_list', 'require|array');
    }

    // GetOrderPartyAUploadList 验证场景定义
    public function sceneGetOrderPartyAUploadList()
    {
        return $this->append('param.id', 'require');
    }

    // GetOrderPartyADownloadList 验证场景定义
    public function sceneGetOrderPartyADownloadList()
    {
        return $this->append('param.id', 'require');
    }

    // GetOrderPartyBUploadList 验证场景定义
    public function sceneGetOrderPartyABUploadList()
    {
        return $this->append('param.id', 'require');
    }

    // GetOrderPartyBDownloadList 验证场景定义
    public function sceneGetOrderPartyBDownloadList()
    {
        return $this->append('param.id', 'require');
    }

    // PartyAMarkDownloaded 验证场景定义
    public function scenePartyAMarkDownloaded()
    {
        return $this->append('param.filter.id', 'require|integer');
    }

    // MarkUnzipped 验证场景定义
    public function sceneMarkUnzipped()
    {
        return $this->append('param.filter.id', 'require|integer');
    }

    // AsyncVersionOrderTaskUpstreamCheck 验证场景定义
    public function sceneAsyncVersionOrderTaskUpstreamCheck()
    {
        return $this->append('param.filter.id', 'require|integer');
    }

    // AsyncOrderTaskUpstreamDownloadedCheckTaskStatus 验证场景定义
    public function sceneAsyncOrderTaskUpstreamDownloadedCheckTaskStatus()
    {
        return $this->append('param.filter.id', 'require|integer');
    }

    // PartyAProjectEpisodeList 验证场景定义
    public function scenePartyAProjectEpisodeList()
    {
        return $this->append('param.project_id', 'require|integer');
    }

    // PartyACount 验证场景定义
    public function scenePartyACount()
    {
        return $this->append('param.project_id', 'require|integer');
    }

    // PartyBCount 验证场景定义
    public function scenePartyBCount()
    {
        return $this->append('param.project_id', 'require|integer');
    }

    // GetPartyAUploadList 验证场景定义
    public function sceneGetPartyAUploadList()
    {
        return $this;
    }

    // GetPartyAUploadCount 验证场景定义
    public function sceneGetPartyAUploadCount()
    {
        return $this
            ->append('param.project_id', 'require|integer');
    }

    // GetPartyADownloadList 验证场景定义
    public function sceneGetPartyADownloadList()
    {
        return $this;
    }

    // GetPartyADownloadCount 验证场景定义
    public function sceneGetPartyADownloadCount()
    {
        return $this
            ->append('param.project_id', 'require|integer');
    }

    // GetPartyBDownloadList 验证场景定义
    public function sceneGetPartyBDownloadList()
    {
        return $this;
    }

    // GetPartyBUploadList 验证场景定义
    public function sceneGetPartyBUploadList()
    {
        return $this;
    }

    // GetPartyBUploadCount 验证场景定义
    public function sceneGetPartyBUploadCount()
    {
        return $this
            ->append('param.project_id', 'require|integer');
    }

    // GetPartyBDownloadCount 验证场景定义
    public function sceneGetPartyBDownloadCount()
    {
        return $this
            ->append('param.project_id', 'require|integer');
    }

    // MarkDownloading 验证场景定义
    public function sceneMarkDownloading()
    {
        return $this->append('param.task_id', 'require|integer')
            ->append('param.is_force', 'in:yes,no')
            ->append('param.download_info', 'array');
    }

    // MarkDownloadErr 验证场景定义
    public function sceneMarkDownloadErr()
    {
        return $this->append('param.task_id', 'require|integer')
            ->append('param.error_info', 'array');
    }

    public function sceneMarkUploading()
    {
        return $this->append('param.task_id', 'require|integer')
            ->append('param.upload_info', 'array');
    }

    public function sceneMarkUploadErr()
    {
        return $this->append('param.task_id', 'require|integer')
            ->append('param.error_info', 'array');
    }

    public function sceneMarkUploaded()
    {
        return $this->append('data.id', 'require|integer')
            ->append('data.is_uploaded', 'require|in:yes,no');
    }
}
